My Logo Atila Madai
  • Home
  • About
  1. Posts
  2. Syncthing Setup: Remote Linux Desktop + WSL + Windows + macOS
  • Posts
    • A/B Test Dashboard – Search UX Evaluation
    • ML QA Computer Vision Assessment
    • COVID-19 Data Analysis
    • Credit Card Fraud Detection with Resampling and Tree-Based Models
    • Adventure Works Cycles: Cost & Elasticity Analysis
    • Dynamic Pricing & Demand Analysis Suite
    • Syncthing Setup: Remote Linux Desktop + WSL + Windows + macOS

On this page

  • 📡 Syncthing Setup: Remote Linux Desktop + WSL + Windows + macOS (Data Science Friendly)
    • Overview
    • Architecture
    • Part 1: WSL + Windows + Remote Linux Desktop
      • ✅ 1. Install Syncthing on All Machines
      • ✅ 2. Configure WSL Syncthing on a Separate Port
      • ✅ 3. Start Syncthing in WSL
      • ✅ 4. Pair Devices Across All UIs
      • ✅ 5. Sync Shared Folder
    • Part 2: Add macOS (MacBook Pro)
      • ✅ 1. Install Syncthing on macOS
      • ✅ 2. Pair with Remote Linux, WSL, and Windows
      • ✅ 3. Sync Folder to Local Dev Path
    • Best Practices
    • Recommended .stignore
    • Auto-Start WSL Syncthing (Optional)
    • WSL Auto-Deploy Script
    • Security Notes
    • Recap
  1. Posts
  2. Syncthing Setup: Remote Linux Desktop + WSL + Windows + macOS

Syncthing Setup: Remote Linux Desktop + WSL + Windows + macOS

tools
workflow
linux
windows
macos
Guide to syncing folders across a primary Linux data science machine, WSL laptop, Windows backup, and MacBook using Syncthing.
Author

Atila Madai

Published

July 12, 2025

Folder Sync Across Devices

📡 Syncthing Setup: Remote Linux Desktop + WSL + Windows + macOS (Data Science Friendly)

Overview

This guide explains how to set up Syncthing to automatically sync project folders between:

  1. A Remote Linux desktop (main data science workstation)
  2. A WSL (Ubuntu) environment on a laptop (for light development and portability)
  3. A Windows host (used mainly for backup and access to legacy tools)
  4. An optional MacBook Pro (portable and optimized for Python and Apple Silicon)

This setup enables seamless, private, real-time synchronization across all machines, allowing for a consistent development experience across environments.


Architecture

Component Role Example Path
Remote Linux Desktop Primary ML/DS powerhouse /home/user/projects/GitHub
WSL (Ubuntu) Portable lightweight dev environment /home/user/GitHub
Windows Host Backup/legacy UI tools D:\GitHub
MacBook Pro Mobile DS/EDA notebook dev /Users/yourname/GitHub

All instances communicate over LAN or internet (encrypted), and changes propagate automatically.


Part 1: WSL + Windows + Remote Linux Desktop

✅ 1. Install Syncthing on All Machines

  • https://syncthing.net/downloads
  • For WSL: sudo apt install syncthing
  • For Remote Linux: sudo apt install syncthing

✅ 2. Configure WSL Syncthing on a Separate Port

syncthing -generate ~/.config/syncthing
nano ~/.config/syncthing/config.xml

Change:

<address>127.0.0.1:8384</address>

To:

<address>127.0.0.1:8385</address>

✅ 3. Start Syncthing in WSL

syncthing

Then open: http://localhost:8385 in your Windows browser.

✅ 4. Pair Devices Across All UIs

  • Open each Syncthing UI: WSL (:8385), Windows (:8384), Linux Desktop (:8384)
  • Go to Actions → Show ID and Add Remote Device for each peer
  • Accept incoming requests across all three

✅ 5. Sync Shared Folder

  • Share a folder like GitHub from the Linux desktop
  • Accept and map the same folder across:
    • Windows: D:\GitHub
    • WSL: /home/user/GitHub
    • Linux: /home/user/projects/GitHub

Part 2: Add macOS (MacBook Pro)

✅ 1. Install Syncthing on macOS

Use Homebrew:

brew install syncthing

Start Syncthing:

syncthing

Open the GUI:

http://localhost:8384

✅ 2. Pair with Remote Linux, WSL, and Windows

  • Copy Mac’s Device ID into the other machines
  • Accept incoming requests in the macOS GUI

✅ 3. Sync Folder to Local Dev Path

On macOS:

  • Folder path: /Users/yourname/GitHub
  • Label: GitHub
  • Set to sync with all other devices

Now all systems (Linux, WSL, Windows, MacBook) sync one unified folder.


Best Practices

  • Use rsync or git inside folders — Syncthing handles raw files
  • Avoid syncing Conda environments or .venv
  • Use .stignore to exclude unnecessary clutter
  • For Mac: avoid syncing folders inside iCloud/Desktop/Documents

Recommended .stignore

# Jupyter checkpoints
.ipynb_checkpoints/

# Python cache
__pycache__/
*.pyc
*.pyo

# Conda and virtual environments
.env/
.venv/
*.conda

# IDEs and Editors
.vscode/
.idea/

# OS-specific
.DS_Store
Thumbs.db

Auto-Start WSL Syncthing (Optional)

In ~/.bashrc or ~/.zshrc:

pgrep -x syncthing > /dev/null || syncthing -no-browser &

WSL Auto-Deploy Script

#!/bin/bash
# syncthing-setup.sh
# Usage: ./syncthing-setup.sh "8385" "GitHub" "~/GitHub"

PORT="${1:-8385}"
LABEL="${2:-GitHub}"
TARGET="${3:-$HOME/GitHub}"

mkdir -p "$TARGET"

# Install Syncthing if missing
if ! command -v syncthing &> /dev/null; then
  sudo apt update && sudo apt install syncthing -y
fi

# Generate config if needed
CONFIG_DIR="$HOME/.config/syncthing"
if [ ! -f "$CONFIG_DIR/config.xml" ]; then
  syncthing -generate "$CONFIG_DIR"
fi

# Update port
sed -i "s/<address>127.0.0.1:[0-9]*<\/address>/<address>127.0.0.1:$PORT<\/address>/" "$CONFIG_DIR/config.xml"

# Launch Syncthing
syncthing -no-browser

Security Notes

  • All traffic is encrypted end-to-end using TLS
  • Devices must explicitly approve each other
  • No external servers or cloud dependencies

Recap

You now have:

  • ✅ Full-folder sync across a remote Linux workstation, WSL dev environment, MacBook, and Windows backup
  • ✅ A single source of truth across platforms
  • ✅ Auto-deploy tools and ignore rules for clean data workflows

This approach simplifies development across platforms, improves reproducibility, and ensures your notebooks, data, and code follow you wherever you work.


This post is part of a multi-device data science workflow series. See related posts on Tailscale peer-to-peer networking, Quarto multi-platform publishing, and remote VS Code dev environments.